#include <iostream>

using namespace std;

//递归判断
int judge(int *arr,int l,int counter=0)
{
    if(arr[l]<arr[l+1]){
        counter+=1;
        counter+=judge(arr,l+1,counter);
    }
    else
    {
        counter=0;
    }
    return counter;
}

int main()
{
    int a[10000];
    int i=0;
    int x;
    while(cin>>x){
        a[i]=x;
        i++;
    }
    int j=0;
    while(a[j]!=0){
        cout<<a[j]<<' ';
        j++;
    }
    cout<<endl;
    int maxs=1;
    for(int i=0;i<j-1;i++){
        int temp=judge(a,i);
        maxs=max(temp,maxs);
    }
    cout<<maxs<<endl;
    return 0;
}

//和上个题思路相近
